package com.latefly.skewwork.ui.page.tools.todo

import androidx.compose.foundation.layout.Column
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavHostController

@Composable
fun ToDoList(
    navController: NavHostController,
    modifier: Modifier,
    todoViewModel: TodoViewModel
) {
    Column {
//        TodoScreen(items = , onAddItem = , onRemoveItem = )
        ToDoListView(modifier, todoViewModel)
    }


}

@Composable
fun ToDoListView(
    modifier: Modifier,
    todoViewModel: TodoViewModel
) {
//    val items = listOf<TodoItem>(
//        TodoItem("Learn compose", TodoIcon.Event),
//        TodoItem("Take a code lab"),
//        TodoItem("Apply state", TodoIcon.Done),
//        TodoItem("Build dynamic UIs", TodoIcon.Square),
//    )


    TodoScreen(
        items = todoViewModel.todoItems,
        onAddItem = todoViewModel::addItem,
        onRemoveItem = todoViewModel::removeItem,
        currentlyEditing = todoViewModel.currentEditItem,
        onEditDone = todoViewModel::onEditDone,
        onEditItemChange = todoViewModel::onEditItemChange,
        onStartEdit = todoViewModel::onEditItemSelected
    )
}